package com.netas.kekmanager.dao.model;

import com.netas.kekmanager.dao.*;
import com.netas.kekmanager.dao.factory.*;
import com.netas.kekmanager.dao.exceptions.*;
import java.io.Serializable;
import java.util.*;

public class UserFavorite implements Serializable
{
	/** 
	 * This attribute maps to the column id in the user_favorite table.
	 */
	protected int id;

	/** 
	 * This attribute maps to the column web_resource_id in the user_favorite table.
	 */
	protected int webResourceId;

	/** 
	 * This attribute maps to the column user_id in the user_favorite table.
	 */
	protected int userId;

	/**
	 * Method 'UserFavorite'
	 * 
	 */
	public UserFavorite()
	{
	}

	/**
	 * Method 'getId'
	 * 
	 * @return int
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * Method 'setId'
	 * 
	 * @param id
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * Method 'getWebResourceId'
	 * 
	 * @return int
	 */
	public int getWebResourceId()
	{
		return webResourceId;
	}

	/**
	 * Method 'setWebResourceId'
	 * 
	 * @param webResourceId
	 */
	public void setWebResourceId(int webResourceId)
	{
		this.webResourceId = webResourceId;
	}

	/**
	 * Method 'getUserId'
	 * 
	 * @return int
	 */
	public int getUserId()
	{
		return userId;
	}

	/**
	 * Method 'setUserId'
	 * 
	 * @param userId
	 */
	public void setUserId(int userId)
	{
		this.userId = userId;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof UserFavorite)) {
			return false;
		}
		
		final UserFavorite _cast = (UserFavorite) _other;
		if (id != _cast.id) {
			return false;
		}
		
		if (webResourceId != _cast.webResourceId) {
			return false;
		}
		
		if (userId != _cast.userId) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + id;
		_hashCode = 29 * _hashCode + webResourceId;
		_hashCode = 29 * _hashCode + userId;
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return UserFavoritePk
	 */
	public UserFavoritePk createPk()
	{
		return new UserFavoritePk(id);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.netas.kekmanager.dao.dto.UserFavorite: " );
		ret.append( "id=" + id );
		ret.append( ", webResourceId=" + webResourceId );
		ret.append( ", userId=" + userId );
		return ret.toString();
	}

}
